package com.whmskj.xjlhsc.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 维保任务流转记录表
 *
 * @author lk
 * @since 2025-06-16 13:31:13
 */
@Data
@TableName("ys_wb_record")
public class WbRecord implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 维保记录ID
     */
    @TableId(type = IdType.ASSIGN_ID)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long recordId;

    /**
     * 维保计划ID
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long planId;

    /**
     * 设备ID
     */
    private Integer deviceId;

    /**
     * 计划开始日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date planDate;

    /**
     * 执行人
     */
    private String executor;

    /**
     * 维保开始时间
     */
    private Date startTime;

    /**
     * 维保结束时间
     */
    private Date endTime;

    /**
     * 逾期天数
     */
    private String overdueDay;

    /**
     * 维保统计状态/码值
     */
    private Integer wbTjState;
    /**
     * 维保记录状态/码值
     */
    private Integer wbRecordState;
    /**
     * 维保监督状态/码值
     */
    private Integer wbJdState;
    /**
     * 维保审核状态/码值
     */
    private Integer wbShState;

    /**
     * 图片url
     */
    private String imageUrls;

    /**
     * 保养结果
     */
    private String resultText;

    /**
     * 使用专件类型
     */
    private String specialType;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 修改时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;


    /**
     * 维保项目类型
     */
    @TableField(exist = false)
    private Integer itemType;

    @TableField(exist = false)
    private String deviceName;
    @TableField(exist = false)
    private String deviceNo;
    @TableField(exist = false)
    private String processName;
    @TableField(exist = false)
    private String workshop;
    @TableField(exist = false)
    private Integer type;
    //queryForm
    @TableField(exist = false)
    private List<String> dateRange;
    @TableField(exist = false)
    private String useTime;

    //维保任务提交-专备件信息
    @TableField(exist = false)
    List<SpecialUseRecord> specialUseRecordList;
}
